//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

namespace Provenance
{
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Windows;
    using Microsoft.Research.ScientificWorkflow.TridentUtilities;
    using System.Globalization;

    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            if (e.Args.Length != 2)
            {
                TridentMessageBox.ShowTridentInformationMessageBox(string.Format(CultureInfo.InvariantCulture, "Usage:{0} -j jobId", AppDomain.CurrentDomain.FriendlyName));
                Environment.Exit(1);
            }
            string guid = e.Args[1];
            this.Properties.Add("JobID", guid);
        }
    }
}
